﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Common;
using System.Data;

namespace _1Dot9MasterDac
{
    /// <summary>
    /// 로그 관리 Dac 클래스
    /// </summary>
    public class ExceptionLogDac : MasterDacBase
    {
        #region ExceptionLog_Insert 
        /// <summary>
        /// 로그를 입력합니다.
        /// </summary>        
        public void ExceptionLog_Insert(string userip, string exectime, string message, string messageDtl)
        {
            DbCommand dbCommand = this.DbAccess.GetStoredProcCommand("dbo.UP_ExceptionLog_Insert");

            this.DbAccess.AddInParameter(dbCommand, "@USER_IP", DbType.String, userip);
            this.DbAccess.AddInParameter(dbCommand, "@LOG_IN_TIME", DbType.String, exectime);
            this.DbAccess.AddInParameter(dbCommand, "@MESSAGE", DbType.String, message);
            this.DbAccess.AddInParameter(dbCommand, "@MESSAGE_DETAIL", DbType.String, messageDtl);
            DbAccess.ExecuteNonQuery(dbCommand);
        }
        #endregion        
    }
}
